import axios from "./axios.config";
import util from "./util";

class UserApi{
  async login(data){
    let result = await axios.post("/users/login/",data);
    return util.jsonTransfer(result);
  }

  async register(data){
    let result = await axios.post("/users/register/",data);
    return util.jsonTransfer(result);
  }

  async logout(user_id){
    console.log("/users/logout/"+user_id);
    let result = await axios.post("/users/logout/"+user_id);
    return util.jsonTransfer(result);
  }
}

export default UserApi;
